package com.yiwyn.controller;

import com.yiwyn.annotation.Frequence;
import com.yiwyn.domain.User;
import lombok.extern.java.Log;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/fre")
@Slf4j
public class FrequenceController {


    @PostMapping("/test")
    @Frequence(rate = 4, uniPrefix = "test.", id = "#user.userId")
    public String test(@RequestBody User user) {
        log.info("入参:{}", user);
        return "success";
    }

}
